'''
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with self work for additional information
 * regarding copyright ownership.  The ASF licenses self file
 * to you under the Apache License, Version 2.0 (the
 * "License") you may not use self file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
'''
from base.rdf.NodeIterator import NodeIterator
from base.util.iterator.impl.NiceIterator import NiceIterator

#import java.util.*;

#import org.apache.jena.rdf.model.*;
#import org.apache.jena.util.iterator.*;

'''
 * An internal class not normally of interest to application developers.
 * An iterator over the nodes in a container.
'''

# NiceIterator<RDFNode>
class ContNodeIteratorImpl(NiceIterator, NodeIterator):

    def __init__(self, ite, obj, container):
        super().__init__()
    # protected Statement recent = null
    # protected final Container cont
    # protected int size
    # protected int index = 0
    # protected int numDeleted = 0
    # # param
    # # result final List<Integer> moved = new
    # def ArrayList<>(self)
    #
    # protected final Iterator<Statement> iterator
    #
    # '''
    #  * Creates ContNodeIteratorImpl
    # '''
    # # param Iterator<Statement> iterator, Object ignored, Container cont:
    # def __init__(self, iteratorObjectContainer):
    #     self.iterator = iterator
    #     self.cont = cont
    #     self.size = cont.size()
    #
    #
    # # @Override
    # # param
    # # result RDFNode
    # def next(self)
    #     recent = iterator.next()
    #     index += 1
    #     return recent.getObject()
    #
    #
    # # @Override
    # # param
    # # result boolean
    # def hasNext(self):
    #     return iterator.hasNext()
    #
    #
    # # @Override
    # # param
    # # result RDFNode
    # def nextNode(self)
    #     return next()
    #
    #
    # # @Override
    # # param
    # # result void
    # def remove(self)
    #     if (recent is None):
    #     raise NoSuchElementException()
    #     iterator.remove()
    #     if (index > (size - numDeleted)):
    #         ((ContainerI) cont).remove(moved.get(size - index).intValue(), recent.getObject())
    #     else:
    #         cont.remove(recent)
    #         moved.add(index)
    #
    #     recent = null
    #     numDeleted += 1
    #
    #
